<template>
	<view class="">
		<view class="top-image">
			<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" style="width: 100%;height: 100%;">
				<swiper-item v-for="(itm, index) in item.images" :key="index">
					<image style="width: 100%;height: 100%;" :src="itm" mode="aspectFit"></image>
				</swiper-item>
			</swiper>
		</view>
		<public-view navType="other" navTitle=" ">
			<view class="content flex f-d-c a-i-c">
				<view class="w-100 mar-b-36" style="background: #FFFFFF;">
					<view class="car-info-box flex f-d-c">
						<view class="car-name f-s-30 f-w-b">
							{{item.title||""}}
						</view>
						<view class="tag-list-box f-s-24 l-h-34 color-2567F3 flex a-i-c f-w-4">
							<view class="item">
								{{item.desc||""}}
							</view>
						</view>
						<view class="moneycar f-s-36 f-w-b l-h-38">
							<text style="font-style: italic;">{{item.first_price||0}}-{{item.last_price||0}}</text><text class="f-s-22 f-w-4">万</text>
						</view>
					</view>
				</view>
				<view class="setting-box">
					<block v-for="(itm,index) in item.images" :key="index">
						<image class="imgaaa" :src="itm" mode="widthFix"></image>
					</block>
				</view>
				<view class="bottombtn-box flex a-i-c j-c-a" @click="$callPhone(item.mobile)">
					<view class="service-btn all-center color-fff f-s-30 f-w-b w-100">
						<image class="icon" src="@/static/images/white-phone-icon.svg" mode=""></image>
						联系车主
						<view class="bottomflur">
							
						</view>
					</view>
				</view>
				<view class="bottom-l"></view>
			</view>
		</public-view>
	</view>
</template>

<script>
	import {goTo} from "@/nav.js"
	export default {
		data() {
			return {
				pay_list:[
					{
						id:'1',
						icon:"/static/images/weixinicon.svg",
						name:"微信支付"
					},
					{
						id:'2',
						icon:"/static/images/zhifubao.svg",
						name:"支付宝支付"
					},
					{
						id:'3',
						icon:"/static/images/yue.svg",
						name:"余额支付"
					}
				],
				item:{},
				second_car_id:""
			};
		},
		onLoad(o) {
			this.second_car_id = o.id
			this.getCarInfo()
		},
		methods:{
			goTo,
			getCarInfo(){
				let that = this
				that.util.getRequest({
					url:"v1/content/lorry_edit",
					data:{
						id:that.second_car_id
					}
				}).then(res=>{
					console.log(res)
					that.item = res.data
				}).catch(e=>{
					uni.showToast({
						title:"参数错误",
						icon:"none"
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.mar-b-36{
		margin-bottom: 20upx;
	}
	.bottom-l{
		height: 180upx;
	}
	.bottombtn-box{
		position: fixed;
		bottom: 0;
		height: 160upx;
		width: 750upx;
		.item-phone{
			
		}
	}
	.setting-box{
		width: 100%;
		padding: 26upx 34upx;
		background: #FFFFFF;
		border-radius: 24upx;
		.imgaaa{
			width: 100%;
			background: #EFEFEF;
		}
	}
	.service-btn{
		background: linear-gradient(180deg, #0E98E8 0%, #2466F2 100%);
		border-radius: 128upx;
		position: relative;
		width: 702upx;
		height: 96upx;
		.icon{
			width: 46upx;
			height: 44upx;
			margin-right: 18upx;
		}
		.bottomflur{
			background: #2567F3;
			filter: blur(24px);
			border-radius: 108px;
			width: 178upx;
			height: 28upx;
			bottom: 0;
			position: absolute;
		}
	}
	.car-info-box{
		width: 100%;
		padding: 38upx;
		background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, #FFFFFF 64.92%);
		border-radius: 24upx;
		.moneycar{
			margin-bottom: 16upx;
			line-height: 38upx;
			color: #EE8300;
			margin-top: 32upx;
		}
		.tag-list-box{
			width: 100%;
			.item{
				padding: 4upx 14upx;
				border: 2upx solid #2567F3;
				border-radius: 4upx;
				margin-right: 24upx;
			}
		}
		.car-name{
			margin-bottom: 18upx;
			line-height: 42upx;
		}
	}
	.top-image{
		width: 100%;
		height: 524upx;
		position: absolute;
		z-index: 2;
		top: 0;
		left: 0;
	}
	.content{
		width: 750upx;
		padding: 342upx 24upx 0;
		position: relative;
		z-index: 2;
		min-height: 100vh;
	}
</style>
